package cz.khfotbal.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cz.khfotbal.dao.RefereeDao;
import cz.khfotbal.domain.Referee;
import cz.khfotbal.service.RefereeService;

@Service
public class RefereeServiceImpl implements RefereeService {

	@Autowired
	private RefereeDao refereeDao;

	public List<Referee> getAllReferees() {
		return refereeDao.findAll();
	}

	public void updateReferee(Referee selectedReferee) {
		refereeDao.update(selectedReferee);

	}

	public void createReferee(Referee newReferee) {
		refereeDao.save(newReferee);

	}

}
